﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Menu.ascx.cs" Inherits="CARMS.Controls.Menu" %>
<div style="margin:0px 10px 10px 10px;">
    <asp:Repeater runat="server" ID="rptMenu" OnItemDataBound="rptMenu_ItemDataBound">
        <ItemTemplate>
            <asp:Panel ID="panelModule" runat="server" CssClass="menuModule">
                <asp:Panel ID="panelModuleTitle" runat="server" CssClass="menuModuleTitle" HorizontalAlign="Left">
                    <asp:Label ID="lblTitle" runat="server" Text='<%# Eval("ActionName") %>'></asp:Label>
                    <asp:ImageButton ID="btnCollapse" runat="server"  ImageUrl="~/Images/Leftmenu_sword_down.GIF" Visible="false"/>
                </asp:Panel>
                <asp:CollapsiblePanelExtender ID="cpeMenuItem" runat="server" TargetControlID="panelMenuItems"
                    ExpandDirection="Vertical" Collapsed="false" ImageControlID="btnCollapse" ExpandedImage="~/Images/Menu/Leftmenu_sword_up.GIF"
                    CollapsedImage="~/Images/Menu/Leftmenu_sword_down.GIF" CollapseControlID="panelModuleTitle"
                    ExpandControlID="panelModuleTitle" SuppressPostBack="false">
                </asp:CollapsiblePanelExtender>          
                <asp:Panel ID="panelMenuItems" runat="server" CssClass="menuModuleChildren">
                    <asp:Repeater runat="server" ID="rptChildren">
                        <ItemTemplate>
                            <div class="menuItem">
                                <asp:Image ID="Image1" runat="server" ImageUrl='<%# Eval("ImageUrl") %>' Width="16px"
                                    Height="16px" />
                                <div>
                                    <asp:HyperLink ID="Label1" runat="server" Text='<%# Eval("ActionName") %>' NavigateUrl='<%# Eval("NavigateUrl") %>'></asp:HyperLink>
                                </div>
                            </div>
                        </ItemTemplate>
                    </asp:Repeater>
                </asp:Panel>
            </asp:Panel>
        </ItemTemplate>
        <SeparatorTemplate>
            <div style="height: 5px">
            </div>
        </SeparatorTemplate>
    </asp:Repeater>
</div>
